package com.zh.zhbootcommon.entity.common;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableName;
import com.zh.zhbootcommon.domain.DBaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 数据字典表
 * </p>
 *
 * @author JueDream
 * @since 2021-10-29
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("zh_common_code")
@ApiModel(value="ZhCommonCode对象", description="数据字典表")
public class CommonCode extends DBaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "编号")
    @TableId(value = "c_id", type = IdType.AUTO)
    private Integer cId;

    @ApiModelProperty(value = "排序号")
    private Integer cSort;

    @ApiModelProperty(value = "code")
    private Integer cCode;

    @ApiModelProperty(value = "父code")
    private Integer cPCode;

    @ApiModelProperty(value = "名称")
    private String cName;

    @ApiModelProperty(value = "内容")
    private String cContent;

    @ApiModelProperty(value = "备注")
    private String cRemark;

    @ApiModelProperty(value = "数组字典子集")
    @TableField(exist = false)
    private List<CommonCode> children = new ArrayList<>();

}
